<%@page import="java.util.Iterator"%>
<%@ page language="java"  import="myclass.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>欢迎光临二手交易网站</title>
</head>
<body>
欢迎光临二手交易网站.<br>

<%
	User curUser=(User)session.getAttribute("user");
	if (curUser!=null){
		out.print("用户："+curUser.getName());
	}
%>

<%
    Integer counter=(Integer)application.getAttribute("counter");
	if (counter==null){
		counter=1;
		
	}else{
		counter++;
	}
	application.setAttribute("counter",counter);
	Db db=new Db();
	out.println(db.getGoodsList().size());
	session.setAttribute("db",db);
	
	
%>
你是第<%=counter %>位访客。
${counter }，${curUser.name }
<table>
<c:forEach var="goods" items="${db.goodsList }">
    <tr><td>${goods.value.name },${goods.key }</td></tr>
</c:forEach>
</table>
</body>
</html>